package com.fanshuai.soring.boot.controller;

import com.fanshuai.soring.boot.constants.CommonConstants;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@RestController
public class NotFoundController {

    @RequestMapping(value = "/notFound")
    public String notFound(HttpServletRequest request, HttpServletResponse response) {
        String originalUri = (String) request.getAttribute(CommonConstants.ORIGINAL_URI);
        return "not found handlers, uri=" + originalUri;
    }
}
